package com.example.crossborderecommerce.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 产品
 *
 * @author Yolanda
 * @since 2024-05-09
 */
@Data
@Accessors(chain = true)
@TableName("product")
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("name")
    private String name;

    @TableField("category_id")
    private Integer categoryId;

    @TableField(exist = false)
    private String categoryName;

    @TableField("attribute_id")
    private Integer attributeId;

    @TableField(exist = false)
    private String attributeDescription;

    @TableField("picture")
    private String picture;

    @TableField("brand_id")
    private Integer brandId;

    @TableField(exist = false)
    private String brandName;

    @TableField("type")
    private String type;

    @TableField("status")
    private String status;

    @TableField("review_times")
    private Integer reviewTimes;

    @TableField("score")
    private Double score;

    @TableField("supplier_id")
    private Integer supplierId;

    @TableField(exist = false)
    private String supplierName;

    @TableField("cost")
    private Double cost;
}
